package com.isoft.illustrationsdraw;

public class Constants {

    // 文件相关常量
    public static class File {
        public static final String ILLUSTRATIONS_DIR = "/home/server/pictures/illustrations/";
        public static final String PROFILEIMG_DIR = "/home/server/pictures/profileimg/";
        public static final String PRODUCTIMG_DIR = "/home/server/pictures/productimg/";
        public static final String MESSAGE_MEDIA_DIR = "/home/server/pictures/messages/";
        public static final String RESOURCE_URL = "http://10.2.3.104:8080/api/media/illustrations/";
        public static final long MAX_FILE_SIZE = 50 * 1024 * 1024; 
        public static final long MAX_REQUEST_SIZE = 200 * 1024 * 1024; 
        public static final String[] ALLOWED_EXTENSIONS = {"jpg", "png", "jpeg", "gif"};
        public static final String BASE_URL = "http://10.2.3.104:8080/pictures/"; 

        private File() {} // 私有化构造器，防止实例化
    }

    // 错误信息
    public static class Error {
        public static final String NO_FILE = "No files provided";
        public static final String INVALID_DIR = "The directory is invalid!";
        public static final String FAILED_CREATE_DIR = "Failed to create directory: ";
        public static final String INVALID_FILE = "Invalid file found!";
        public static final String FILE_UPLOAD_FAILED = "File upload failed: ";
        public static final String DIR_NOT_EXIST = "Directory does not exist!";
        public static final String INVALID_TOKEN = "Invalid request!";
        public static final String FAILED_SAVE_FILE = "Failed to save file!";
        public static final String FAILED_READ_DIR = "Failed to read directory!";
        public static final String UNEXPECTED_SUB_DIR = "Unexpected sub directory found: ";
        public static final String FAILED_CREATE_ILLUSTRATION = "Failed to create illustration.";
        public static final String INVALID_RESOURCE_TYPE = "Invalid resource type: ";
        public static final String INVALID_ILLUSTRATION_ID = "Invalid illustration ID!";
        public static final String INVALID_INDEX = "Invalid index!";
        public static final String USER_BANNED = "User is banned!";
        public static final String USER_NOT_FOUND = "User not found!";
        public static final String SAVE_MESSAGE_FAILED = "Failed to save message";
        public static final String INVALID_MESSAGE_FILE_COUNT = "Invalid message file count! Only one file is allowed!";

        private Error() {}
    }

    public static class Auth {
        public static final String MAGIC_LINK = "http://10.2.3.104/use-magic?token=";
    }

    private Constants() {} // 私有化构造器，防止实例化
}

